#ifndef DEFIN_H
#define DEFIN_H

#define DISTANCE_TOLERANCE 30

#define MAXVIEWFILTER 400
#define filterDigree  0
#define LaserPointsCount   720
#define LaserDegree        0.25
#define LaserStep          4
#define HT_GAMA            1.764705882
#define HT_DISTANCE        100
#define POINTINSEGMENT     102
#define COUNTSEGMENT       7
#define LEG_SEPARATION     50
#define  TOLERANCEINDEX 20
#define TOLERANCEDISTANCE 300

#include <objectPoint.h>
#include <vector>
typedef enum
{
    UTM = 0,
    UBG = 1
} LRF_DEVICE;
class Pair
{
public:
    PointF pos1_;
    PointF pos2_;
    string legType;
    double confidenceFactor;
    Pair(PointF pos1,PointF pos2,string str ,double CF)
        :pos1_(pos1)
        ,pos2_(pos2)
        ,legType(str)
        ,confidenceFactor(CF)
    {};
};

typedef  struct _POS2D
{
    float x;
    float y;
    float theta;
}POS2D;

typedef struct _PointTorso
{
    int index;
    POS2D pos2d;
    double distance;
    _PointTorso()
    {
        distance = 0;
    }
}pointTorso;

class TORSO_OBJECT
{
public:
    _PointTorso startPoint;
    _PointTorso middlePoint;
    _PointTorso endPoint;
    int torsoId;
    TORSO_OBJECT()
    {

    }

    TORSO_OBJECT(_PointTorso start, _PointTorso mid , _PointTorso end , int id)
        :torsoId(id)
        ,startPoint(start)
        ,middlePoint(mid)
        ,endPoint(end)
    {}
};




typedef struct convexHull_Struct
{

    float Rmin,Rmax;
    objectPoint minPoint;
    objectPoint maxPoint;

    void setMinPoint(float Xmin,float Ymin)
    {
        minPoint.SetXY(Xmin,Ymin);
    }
    void setMaxPoint(float Xmax,float Ymax)
    {
        maxPoint.SetXY(Xmax,Ymax);
    }
    float getXmin()
    {
        return minPoint.getX();
    }
    float getYmin()
    {
        return minPoint.getY();
    }
    float getXmax()
    {
        return maxPoint.getX();
    }
    float getYmax()
    {
        return maxPoint.getY();
    }
}eConvexHull;

typedef  struct eeLinePoint_Struct
{
    float x;
    float y;
    float r;
}eLinePoint;

typedef  struct eLine_Struct
{

    eLinePoint StartPoint;
    eLinePoint EndPoint;
    float m;
}eLine;


#endif // DEFIN_H
